<?php TPL::output('global/header.tpl.htm'); ?>

<div class="i_bd mainElem i_clear i_allbg">
	<div class="i_left L_sidebar"> 
		<div class="b_restrain">
			<h3 class="latest_trendst_h3  i_prl q_content_h3">
				<p class="i_right p_sx"><a href="account/setting/privacy/#inbox" class="p_set i_small" title="私信设置">私信设置</a><a href="javascript:;" class="i_green_bt2" onClick="$.startQs({flgs:1,msg:true}); return false;">发私信</a></p>
				私信
			</h3>
			<ul class="pri_letter">
				<?php if ($this->list) { ?>
				<?php foreach($this->list AS $key => $val) { ?>
				<li class="<?php if($val['unread'] > 0){ ?>msg_unread<?php } ?>">

					<a href="people/<?php echo $val['url_token']; ?>" class="add_user_f"><img src="<?php echo get_avatar_url($val['uid'], 'mid'); ?>" alt="<?php echo $val['user_name']; ?>" title="<?php echo $val['user_name']; ?>"/></a><span class="p_name"> <a href="inbox/read_message/dialog_id-<?php echo $val['dialog_id']; ?>"><?php echo $val['user_name']; ?></a></span>
					<p class="p_txt"><?php echo $val['last_message']; ?></p>
					<p class="p_time"><span class="i_right"><a href="inbox/read_message/dialog_id-<?php echo $val['dialog_id']; ?>#!contents"><?php if ($val['unread']) { ?>有 <?php echo $val['unread']; ?> 条新回复<?php } else { ?>共 <?php echo $val['count']; ?> 条对话<?php } ?></a> &nbsp; <a href="javascript:;" onclick="if (confirm('确认删除对话?')) { window.location = G_BASE_URL + '/inbox/delete_dialog/dialog_id-<?php echo $val['dialog_id']; ?>' }">删除</a></span><?php echo date('Y-m-d H:i', $val['last_time']); ?></p>
				</li>
				<?php } ?>
				<?php } ?>
			</ul>
			
			<?php echo $this->pagination; ?>
		</div>	
	</div>

	<div class="R_sidebar"> 
		<?php TPL::output('block/sidebar_menu.tpl.htm'); ?>	
	</div>
</div>

<?php TPL::output('global/footer.tpl.htm'); ?>
